package com.example.springbootmybatisplus.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import com.example.springbootmybatisplus.common.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 课程
 * </p>
 *
 * @author zx
 * @since 2021-09-03
 */
@Data
  @EqualsAndHashCode(callSuper = true)
    @TableName("edu_course")
public class Course extends BaseEntity {

    private static final long serialVersionUID = 1L;

      /**
     * 课程讲师ID
     */
      private Long teacherId;

      /**
     * 课程专业ID
     */
      private Long subjectId;

      /**
     * 课程专业父级ID
     */
      private Long subjectParentId;

      /**
     * 课程标题
     */
      private String title;

      /**
     * 课程销售价格，设置为0则可免费观看
     */
      private BigDecimal price;

      /**
     * 总课时
     */
      private Integer lessonNum;

      /**
     * 课程封面图片路径
     */
      private String cover;

      /**
     * 销售数量
     */
      private Long buyCount;

      /**
     * 浏览数量
     */
      private Long viewCount;

      /**
     * 乐观锁
     */
      @Version
      private Long version;

      /**
     * 课程状态 Draft未发布  Normal已发布
     */
      private String status;

      /**
     * 逻辑删除 1（true）已删除， 0（false）未删除
     */
      @TableField("is_deleted")
    @TableLogic
    private Boolean deleted;


}
